<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-pragma">{-# LANGUAGE CPP #-}</span><span>
</span><span id="line-2"></span><span class="hs-pragma">{-# LANGUAGE LambdaCase #-}</span><span>
</span><span id="line-3"></span><span class="hs-pragma">{-# LANGUAGE ScopedTypeVariables #-}</span><span>
</span><span id="line-4"></span><span>
</span><span id="line-5"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">GHC.Settings.IO</span><span>
</span><span id="line-6"></span><span> </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="GHC.Settings.IO.html#SettingsError"><span class="hs-identifier">SettingsError</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span>
</span><span id="line-7"></span><span> </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Settings.IO.html#initSettings"><span class="hs-identifier">initSettings</span></a></span><span>
</span><span id="line-8"></span><span> </span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span class="hs-cpp">

#include &quot;HsVersions.h&quot;
</span><span>
</span><span id="line-12"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Prelude.html"><span class="hs-identifier">GHC.Prelude</span></a></span><span>
</span><span id="line-13"></span><span>
</span><span id="line-14"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../ghc-boot/src/GHC.Settings.Platform.html#"><span class="hs-identifier">GHC.Settings.Platform</span></a></span><span>
</span><span id="line-15"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../ghc-boot/src/GHC.Settings.Utils.html#"><span class="hs-identifier">GHC.Settings.Utils</span></a></span><span>
</span><span id="line-16"></span><span>
</span><span id="line-17"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Settings.Config.html"><span class="hs-identifier">GHC.Settings.Config</span></a></span><span>
</span><span id="line-18"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.CliOption.html"><span class="hs-identifier">GHC.Utils.CliOption</span></a></span><span>
</span><span id="line-19"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.Fingerprint.html"><span class="hs-identifier">GHC.Utils.Fingerprint</span></a></span><span>
</span><span id="line-20"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../ghc-boot/src/GHC.Platform.html#"><span class="hs-identifier">GHC.Platform</span></a></span><span>
</span><span id="line-21"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html"><span class="hs-identifier">GHC.Utils.Outputable</span></a></span><span>
</span><span id="line-22"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Settings.html"><span class="hs-identifier">GHC.Settings</span></a></span><span>
</span><span id="line-23"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.SysTools.BaseDir.html"><span class="hs-identifier">GHC.SysTools.BaseDir</span></a></span><span>
</span><span id="line-24"></span><span>
</span><span id="line-25"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../transformers/src/Control.Monad.Trans.Except.html#"><span class="hs-identifier">Control.Monad.Trans.Except</span></a></span><span>
</span><span id="line-26"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Control.Monad.IO.Class.html#"><span class="hs-identifier">Control.Monad.IO.Class</span></a></span><span>
</span><span id="line-27"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="../../containers/src/Data.Map.html#"><span class="hs-identifier">Data.Map</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">Map</span></span><span>
</span><span id="line-28"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../filepath/src/System.FilePath.html#"><span class="hs-identifier">System.FilePath</span></a></span><span>
</span><span id="line-29"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../directory/src/System.Directory.html#"><span class="hs-identifier">System.Directory</span></a></span><span>
</span><span id="line-30"></span><span>
</span><span id="line-31"></span><span class="hs-keyword">data</span><span> </span><span id="SettingsError"><span class="annot"><a href="GHC.Settings.IO.html#SettingsError"><span class="hs-identifier hs-var">SettingsError</span></a></span></span><span>
</span><span id="line-32"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span id="SettingsError_MissingData"><span class="annot"><a href="GHC.Settings.IO.html#SettingsError_MissingData"><span class="hs-identifier hs-var">SettingsError_MissingData</span></a></span></span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>
</span><span id="line-33"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="SettingsError_BadData"><span class="annot"><a href="GHC.Settings.IO.html#SettingsError_BadData"><span class="hs-identifier hs-var">SettingsError_BadData</span></a></span></span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>
</span><span id="line-34"></span><span>
</span><span id="line-35"></span><span class="annot"><a href="GHC.Settings.IO.html#initSettings"><span class="hs-identifier hs-type">initSettings</span></a></span><span>
</span><span id="line-36"></span><span>  </span><span class="hs-glyph">::</span><span> </span><span class="hs-keyword">forall</span><span> </span><span id="local-6989586621680942464"><span class="annot"><a href="#local-6989586621680942464"><span class="hs-identifier hs-type">m</span></a></span></span><span>
</span><span id="line-37"></span><span>  </span><span class="hs-operator">.</span><span>  </span><span class="annot"><a href="../../base/src/Control.Monad.IO.Class.html#MonadIO"><span class="hs-identifier hs-type">MonadIO</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680942464"><span class="hs-identifier hs-type">m</span></a></span><span>
</span><span id="line-38"></span><span>  </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-comment">-- ^ TopDir path</span><span>
</span><span id="line-39"></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../transformers/src/Control.Monad.Trans.Except.html#ExceptT"><span class="hs-identifier hs-type">ExceptT</span></a></span><span> </span><span class="annot"><a href="GHC.Settings.IO.html#SettingsError"><span class="hs-identifier hs-type">SettingsError</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680942464"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="GHC.Settings.html#Settings"><span class="hs-identifier hs-type">Settings</span></a></span><span>
</span><span id="line-40"></span><span id="initSettings"><span class="annot"><span class="annottext">initSettings :: forall (m :: * -&gt; *).
MonadIO m =&gt;
String -&gt; ExceptT SettingsError m Settings
</span><a href="GHC.Settings.IO.html#initSettings"><span class="hs-identifier hs-var hs-var">initSettings</span></a></span></span><span> </span><span id="local-6989586621680942307"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680942307"><span class="hs-identifier hs-var">top_dir</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-41"></span><span>  </span><span class="hs-comment">-- see Note [topdir: How GHC finds its files]</span><span>
</span><span id="line-42"></span><span>  </span><span class="hs-comment">-- NB: top_dir is assumed to be in standard Unix</span><span>
</span><span id="line-43"></span><span>  </span><span class="hs-comment">-- format, '/' separated</span><span>
</span><span id="line-44"></span><span>  </span><span id="local-6989586621680942306"><span class="annot"><span class="annottext">Maybe String
</span><a href="#local-6989586621680942306"><span class="hs-identifier hs-var">mtool_dir</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">IO (Maybe String) -&gt; ExceptT SettingsError m (Maybe String)
forall (m :: * -&gt; *) a. MonadIO m =&gt; IO a -&gt; m a
</span><a href="../../base/src/Control.Monad.IO.Class.html#liftIO"><span class="hs-identifier hs-var">liftIO</span></a></span><span> </span><span class="annot"><span class="annottext">(IO (Maybe String) -&gt; ExceptT SettingsError m (Maybe String))
-&gt; IO (Maybe String) -&gt; ExceptT SettingsError m (Maybe String)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; IO (Maybe String)
</span><a href="GHC.SysTools.BaseDir.html#findToolDir"><span class="hs-identifier hs-var">findToolDir</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680942307"><span class="hs-identifier hs-var">top_dir</span></a></span><span>
</span><span id="line-45"></span><span>        </span><span class="hs-comment">-- see Note [tooldir: How GHC finds mingw on Windows]</span><span>
</span><span id="line-46"></span><span>
</span><span id="line-47"></span><span>  </span><span class="hs-keyword">let</span><span> </span><span class="annot"><a href="#local-6989586621680942303"><span class="hs-identifier hs-type">installed</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span>
</span><span id="line-48"></span><span>      </span><span id="local-6989586621680942303"><span class="annot"><span class="annottext">installed :: String -&gt; String
</span><a href="#local-6989586621680942303"><span class="hs-identifier hs-var hs-var">installed</span></a></span></span><span> </span><span id="local-6989586621680942301"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680942301"><span class="hs-identifier hs-var">file</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680942307"><span class="hs-identifier hs-var">top_dir</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C%2F%3E"><span class="hs-operator hs-var">&lt;/&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680942301"><span class="hs-identifier hs-var">file</span></a></span><span>
</span><span id="line-49"></span><span>      </span><span class="annot"><a href="#local-6989586621680942299"><span class="hs-identifier hs-type">libexec</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span>
</span><span id="line-50"></span><span>      </span><span id="local-6989586621680942299"><span class="annot"><span class="annottext">libexec :: String -&gt; String
</span><a href="#local-6989586621680942299"><span class="hs-identifier hs-var hs-var">libexec</span></a></span></span><span> </span><span id="local-6989586621680942298"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680942298"><span class="hs-identifier hs-var">file</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680942307"><span class="hs-identifier hs-var">top_dir</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C%2F%3E"><span class="hs-operator hs-var">&lt;/&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;bin&quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C%2F%3E"><span class="hs-operator hs-var">&lt;/&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680942298"><span class="hs-identifier hs-var">file</span></a></span><span>
</span><span id="line-51"></span><span>      </span><span id="local-6989586621680942297"><span class="annot"><span class="annottext">settingsFile :: String
</span><a href="#local-6989586621680942297"><span class="hs-identifier hs-var hs-var">settingsFile</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; String
</span><a href="#local-6989586621680942303"><span class="hs-identifier hs-var">installed</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;settings&quot;</span></span><span>
</span><span id="line-52"></span><span>      </span><span id="local-6989586621680942296"><span class="annot"><span class="annottext">platformConstantsFile :: String
</span><a href="#local-6989586621680942296"><span class="hs-identifier hs-var hs-var">platformConstantsFile</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; String
</span><a href="#local-6989586621680942303"><span class="hs-identifier hs-var">installed</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;platformConstants&quot;</span></span><span>
</span><span id="line-53"></span><span>
</span><span id="line-54"></span><span>      </span><span class="annot"><a href="#local-6989586621680942295"><span class="hs-identifier hs-type">readFileSafe</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../transformers/src/Control.Monad.Trans.Except.html#ExceptT"><span class="hs-identifier hs-type">ExceptT</span></a></span><span> </span><span class="annot"><a href="GHC.Settings.IO.html#SettingsError"><span class="hs-identifier hs-type">SettingsError</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680942464"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>
</span><span id="line-55"></span><span>      </span><span id="local-6989586621680942295"><span class="annot"><span class="annottext">readFileSafe :: String -&gt; ExceptT SettingsError m String
</span><a href="#local-6989586621680942295"><span class="hs-identifier hs-var hs-var">readFileSafe</span></a></span></span><span> </span><span id="local-6989586621680942294"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680942294"><span class="hs-identifier hs-var">path</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IO Bool -&gt; ExceptT SettingsError m Bool
forall (m :: * -&gt; *) a. MonadIO m =&gt; IO a -&gt; m a
</span><a href="../../base/src/Control.Monad.IO.Class.html#liftIO"><span class="hs-identifier hs-var">liftIO</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; IO Bool
</span><a href="../../directory/src/System.Directory.html#doesFileExist"><span class="hs-identifier hs-var">doesFileExist</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680942294"><span class="hs-identifier hs-var">path</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">ExceptT SettingsError m Bool
-&gt; (Bool -&gt; ExceptT SettingsError m String)
-&gt; ExceptT SettingsError m String
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; (a -&gt; m b) -&gt; m b
</span><a href="../../base/src/GHC.Base.html#%3E%3E%3D"><span class="hs-operator hs-var">&gt;&gt;=</span></a></span><span> </span><span class="hs-glyph">\</span><span class="hs-glyph">case</span><span>
</span><span id="line-56"></span><span>        </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">IO String -&gt; ExceptT SettingsError m String
forall (m :: * -&gt; *) a. MonadIO m =&gt; IO a -&gt; m a
</span><a href="../../base/src/Control.Monad.IO.Class.html#liftIO"><span class="hs-identifier hs-var">liftIO</span></a></span><span> </span><span class="annot"><span class="annottext">(IO String -&gt; ExceptT SettingsError m String)
-&gt; IO String -&gt; ExceptT SettingsError m String
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; IO String
</span><a href="../../base/src/System.IO.html#readFile"><span class="hs-identifier hs-var">readFile</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680942294"><span class="hs-identifier hs-var">path</span></a></span><span>
</span><span id="line-57"></span><span>        </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">SettingsError -&gt; ExceptT SettingsError m String
forall (m :: * -&gt; *) e a. Monad m =&gt; e -&gt; ExceptT e m a
</span><a href="../../transformers/src/Control.Monad.Trans.Except.html#throwE"><span class="hs-identifier hs-var">throwE</span></a></span><span> </span><span class="annot"><span class="annottext">(SettingsError -&gt; ExceptT SettingsError m String)
-&gt; SettingsError -&gt; ExceptT SettingsError m String
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; SettingsError
</span><a href="GHC.Settings.IO.html#SettingsError_MissingData"><span class="hs-identifier hs-var">SettingsError_MissingData</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; SettingsError) -&gt; String -&gt; SettingsError
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Missing file: &quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680942294"><span class="hs-identifier hs-var">path</span></a></span><span>
</span><span id="line-58"></span><span>
</span><span id="line-59"></span><span>  </span><span id="local-6989586621680942290"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680942290"><span class="hs-identifier hs-var">settingsStr</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">String -&gt; ExceptT SettingsError m String
</span><a href="#local-6989586621680942295"><span class="hs-identifier hs-var">readFileSafe</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680942297"><span class="hs-identifier hs-var">settingsFile</span></a></span><span>
</span><span id="line-60"></span><span>  </span><span id="local-6989586621680942289"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680942289"><span class="hs-identifier hs-var">platformConstantsStr</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">String -&gt; ExceptT SettingsError m String
</span><a href="#local-6989586621680942295"><span class="hs-identifier hs-var">readFileSafe</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680942296"><span class="hs-identifier hs-var">platformConstantsFile</span></a></span><span>
</span><span id="line-61"></span><span>  </span><span id="local-6989586621680942288"><span class="annot"><span class="annottext">[(String, String)]
</span><a href="#local-6989586621680942288"><span class="hs-identifier hs-var">settingsList</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">String -&gt; Maybe [(String, String)]
forall a. Read a =&gt; String -&gt; Maybe a
</span><a href="../../ghc-boot/src/GHC.Settings.Utils.html#maybeReadFuzzy"><span class="hs-identifier hs-var">maybeReadFuzzy</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680942290"><span class="hs-identifier hs-var">settingsStr</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-62"></span><span>    </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621680942286"><span class="annot"><span class="annottext">[(String, String)]
</span><a href="#local-6989586621680942286"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">[(String, String)] -&gt; ExceptT SettingsError m [(String, String)]
forall (f :: * -&gt; *) a. Applicative f =&gt; a -&gt; f a
</span><a href="../../base/src/GHC.Base.html#pure"><span class="hs-identifier hs-var">pure</span></a></span><span> </span><span class="annot"><span class="annottext">[(String, String)]
</span><a href="#local-6989586621680942286"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-63"></span><span>    </span><span class="annot"><span class="annottext">Maybe [(String, String)]
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">SettingsError -&gt; ExceptT SettingsError m [(String, String)]
forall (m :: * -&gt; *) e a. Monad m =&gt; e -&gt; ExceptT e m a
</span><a href="../../transformers/src/Control.Monad.Trans.Except.html#throwE"><span class="hs-identifier hs-var">throwE</span></a></span><span> </span><span class="annot"><span class="annottext">(SettingsError -&gt; ExceptT SettingsError m [(String, String)])
-&gt; SettingsError -&gt; ExceptT SettingsError m [(String, String)]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; SettingsError
</span><a href="GHC.Settings.IO.html#SettingsError_BadData"><span class="hs-identifier hs-var">SettingsError_BadData</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; SettingsError) -&gt; String -&gt; SettingsError
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-64"></span><span>      </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Can't parse &quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String
forall a. Show a =&gt; a -&gt; String
</span><a href="../../base/src/GHC.Show.html#show"><span class="hs-identifier hs-var">show</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680942297"><span class="hs-identifier hs-var">settingsFile</span></a></span><span>
</span><span id="line-65"></span><span>  </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621680942280"><span class="annot"><span class="annottext">mySettings :: Map String String
</span><a href="#local-6989586621680942280"><span class="hs-identifier hs-var hs-var">mySettings</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[(String, String)] -&gt; Map String String
forall k a. Ord k =&gt; [(k, a)] -&gt; Map k a
</span><a href="../../containers/src/Data.Map.Internal.html#fromList"><span class="hs-identifier hs-var">Map.fromList</span></a></span><span> </span><span class="annot"><span class="annottext">[(String, String)]
</span><a href="#local-6989586621680942288"><span class="hs-identifier hs-var">settingsList</span></a></span><span>
</span><span id="line-66"></span><span>  </span><span id="local-6989586621680942278"><span class="annot"><span class="annottext">PlatformConstants
</span><a href="#local-6989586621680942278"><span class="hs-identifier hs-var">platformConstants</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">String -&gt; Maybe PlatformConstants
forall a. Read a =&gt; String -&gt; Maybe a
</span><a href="../../ghc-boot/src/GHC.Settings.Utils.html#maybeReadFuzzy"><span class="hs-identifier hs-var">maybeReadFuzzy</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680942289"><span class="hs-identifier hs-var">platformConstantsStr</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-67"></span><span>    </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621680942277"><span class="annot"><span class="annottext">PlatformConstants
</span><a href="#local-6989586621680942277"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">PlatformConstants -&gt; ExceptT SettingsError m PlatformConstants
forall (f :: * -&gt; *) a. Applicative f =&gt; a -&gt; f a
</span><a href="../../base/src/GHC.Base.html#pure"><span class="hs-identifier hs-var">pure</span></a></span><span> </span><span class="annot"><span class="annottext">PlatformConstants
</span><a href="#local-6989586621680942277"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-68"></span><span>    </span><span class="annot"><span class="annottext">Maybe PlatformConstants
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">SettingsError -&gt; ExceptT SettingsError m PlatformConstants
forall (m :: * -&gt; *) e a. Monad m =&gt; e -&gt; ExceptT e m a
</span><a href="../../transformers/src/Control.Monad.Trans.Except.html#throwE"><span class="hs-identifier hs-var">throwE</span></a></span><span> </span><span class="annot"><span class="annottext">(SettingsError -&gt; ExceptT SettingsError m PlatformConstants)
-&gt; SettingsError -&gt; ExceptT SettingsError m PlatformConstants
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; SettingsError
</span><a href="GHC.Settings.IO.html#SettingsError_BadData"><span class="hs-identifier hs-var">SettingsError_BadData</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; SettingsError) -&gt; String -&gt; SettingsError
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-69"></span><span>      </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Can't parse &quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String
forall a. Show a =&gt; a -&gt; String
</span><a href="../../base/src/GHC.Show.html#show"><span class="hs-identifier hs-var">show</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680942296"><span class="hs-identifier hs-var">platformConstantsFile</span></a></span><span>
</span><span id="line-70"></span><span>  </span><span class="hs-comment">-- See Note [Settings file] for a little more about this file. We're</span><span>
</span><span id="line-71"></span><span>  </span><span class="hs-comment">-- just partially applying those functions and throwing 'Left's; they're</span><span>
</span><span id="line-72"></span><span>  </span><span class="hs-comment">-- written in a very portable style to keep ghc-boot light.</span><span>
</span><span id="line-73"></span><span>  </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621680942274"><span class="annot"><span class="annottext">getSetting :: String -&gt; f String
</span><a href="#local-6989586621680942274"><span class="hs-identifier hs-var hs-var">getSetting</span></a></span></span><span> </span><span id="local-6989586621680942273"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680942273"><span class="hs-identifier hs-var">key</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(String -&gt; f String)
-&gt; (String -&gt; f String) -&gt; Either String String -&gt; f String
forall a c b. (a -&gt; c) -&gt; (b -&gt; c) -&gt; Either a b -&gt; c
</span><a href="../../base/src/Data.Either.html#either"><span class="hs-identifier hs-var">either</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; f String
forall a. String -&gt; a
</span><a href="GHC.Utils.Panic.Plain.html#pgmError"><span class="hs-identifier hs-var">pgmError</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; f String
forall (f :: * -&gt; *) a. Applicative f =&gt; a -&gt; f a
</span><a href="../../base/src/GHC.Base.html#pure"><span class="hs-identifier hs-var">pure</span></a></span><span> </span><span class="annot"><span class="annottext">(Either String String -&gt; f String)
-&gt; Either String String -&gt; f String
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-74"></span><span>        </span><span class="annot"><span class="annottext">String
-&gt; String -&gt; Map String String -&gt; String -&gt; Either String String
</span><a href="../../ghc-boot/src/GHC.Settings.Platform.html#getFilePathSetting0"><span class="hs-identifier hs-var">getFilePathSetting0</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680942307"><span class="hs-identifier hs-var">top_dir</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680942297"><span class="hs-identifier hs-var">settingsFile</span></a></span><span> </span><span class="annot"><span class="annottext">Map String String
</span><a href="#local-6989586621680942280"><span class="hs-identifier hs-var">mySettings</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680942273"><span class="hs-identifier hs-var">key</span></a></span><span>
</span><span id="line-75"></span><span>      </span><span class="annot"><a href="#local-6989586621680942269"><span class="hs-identifier hs-type">getToolSetting</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../transformers/src/Control.Monad.Trans.Except.html#ExceptT"><span class="hs-identifier hs-type">ExceptT</span></a></span><span> </span><span class="annot"><a href="GHC.Settings.IO.html#SettingsError"><span class="hs-identifier hs-type">SettingsError</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680942464"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>
</span><span id="line-76"></span><span>      </span><span id="local-6989586621680942269"><span class="annot"><span class="annottext">getToolSetting :: String -&gt; ExceptT SettingsError m String
</span><a href="#local-6989586621680942269"><span class="hs-identifier hs-var hs-var">getToolSetting</span></a></span></span><span> </span><span id="local-6989586621680942268"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680942268"><span class="hs-identifier hs-var">key</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe String -&gt; String -&gt; String
</span><a href="GHC.SysTools.BaseDir.html#expandToolDir"><span class="hs-identifier hs-var">expandToolDir</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe String
</span><a href="#local-6989586621680942306"><span class="hs-identifier hs-var">mtool_dir</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; String)
-&gt; ExceptT SettingsError m String -&gt; ExceptT SettingsError m String
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/Data.Functor.html#%3C%24%3E"><span class="hs-operator hs-var">&lt;$&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; ExceptT SettingsError m String
forall {f :: * -&gt; *}. Applicative f =&gt; String -&gt; f String
</span><a href="#local-6989586621680942274"><span class="hs-identifier hs-var">getSetting</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680942268"><span class="hs-identifier hs-var">key</span></a></span><span>
</span><span id="line-77"></span><span>      </span><span class="annot"><a href="#local-6989586621680942265"><span class="hs-identifier hs-type">getBooleanSetting</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../transformers/src/Control.Monad.Trans.Except.html#ExceptT"><span class="hs-identifier hs-type">ExceptT</span></a></span><span> </span><span class="annot"><a href="GHC.Settings.IO.html#SettingsError"><span class="hs-identifier hs-type">SettingsError</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680942464"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-78"></span><span>      </span><span id="local-6989586621680942265"><span class="annot"><span class="annottext">getBooleanSetting :: String -&gt; ExceptT SettingsError m Bool
</span><a href="#local-6989586621680942265"><span class="hs-identifier hs-var hs-var">getBooleanSetting</span></a></span></span><span> </span><span id="local-6989586621680942264"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680942264"><span class="hs-identifier hs-var">key</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(String -&gt; ExceptT SettingsError m Bool)
-&gt; (Bool -&gt; ExceptT SettingsError m Bool)
-&gt; Either String Bool
-&gt; ExceptT SettingsError m Bool
forall a c b. (a -&gt; c) -&gt; (b -&gt; c) -&gt; Either a b -&gt; c
</span><a href="../../base/src/Data.Either.html#either"><span class="hs-identifier hs-var">either</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; ExceptT SettingsError m Bool
forall a. String -&gt; a
</span><a href="GHC.Utils.Panic.Plain.html#pgmError"><span class="hs-identifier hs-var">pgmError</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; ExceptT SettingsError m Bool
forall (f :: * -&gt; *) a. Applicative f =&gt; a -&gt; f a
</span><a href="../../base/src/GHC.Base.html#pure"><span class="hs-identifier hs-var">pure</span></a></span><span> </span><span class="annot"><span class="annottext">(Either String Bool -&gt; ExceptT SettingsError m Bool)
-&gt; Either String Bool -&gt; ExceptT SettingsError m Bool
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-79"></span><span>        </span><span class="annot"><span class="annottext">String -&gt; Map String String -&gt; String -&gt; Either String Bool
</span><a href="../../ghc-boot/src/GHC.Settings.Platform.html#getBooleanSetting0"><span class="hs-identifier hs-var">getBooleanSetting0</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680942297"><span class="hs-identifier hs-var">settingsFile</span></a></span><span> </span><span class="annot"><span class="annottext">Map String String
</span><a href="#local-6989586621680942280"><span class="hs-identifier hs-var">mySettings</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680942264"><span class="hs-identifier hs-var">key</span></a></span><span>
</span><span id="line-80"></span><span>  </span><span id="local-6989586621680942262"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680942262"><span class="hs-identifier hs-var">targetPlatformString</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">String -&gt; ExceptT SettingsError m String
forall {f :: * -&gt; *}. Applicative f =&gt; String -&gt; f String
</span><a href="#local-6989586621680942274"><span class="hs-identifier hs-var">getSetting</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;target platform string&quot;</span></span><span>
</span><span id="line-81"></span><span>  </span><span id="local-6989586621680942261"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680942261"><span class="hs-identifier hs-var">myExtraGccViaCFlags</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">String -&gt; ExceptT SettingsError m String
forall {f :: * -&gt; *}. Applicative f =&gt; String -&gt; f String
</span><a href="#local-6989586621680942274"><span class="hs-identifier hs-var">getSetting</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;GCC extra via C opts&quot;</span></span><span>
</span><span id="line-82"></span><span>  </span><span class="hs-comment">-- On Windows, mingw is distributed with GHC,</span><span>
</span><span id="line-83"></span><span>  </span><span class="hs-comment">-- so we look in TopDir/../mingw/bin,</span><span>
</span><span id="line-84"></span><span>  </span><span class="hs-comment">-- as well as TopDir/../../mingw/bin for hadrian.</span><span>
</span><span id="line-85"></span><span>  </span><span class="hs-comment">-- It would perhaps be nice to be able to override this</span><span>
</span><span id="line-86"></span><span>  </span><span class="hs-comment">-- with the settings file, but it would be a little fiddly</span><span>
</span><span id="line-87"></span><span>  </span><span class="hs-comment">-- to make that possible, so for now you can't.</span><span>
</span><span id="line-88"></span><span>  </span><span id="local-6989586621680942260"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680942260"><span class="hs-identifier hs-var">cc_prog</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">String -&gt; ExceptT SettingsError m String
</span><a href="#local-6989586621680942269"><span class="hs-identifier hs-var">getToolSetting</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;C compiler command&quot;</span></span><span>
</span><span id="line-89"></span><span>  </span><span id="local-6989586621680942259"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680942259"><span class="hs-identifier hs-var">cc_args_str</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">String -&gt; ExceptT SettingsError m String
forall {f :: * -&gt; *}. Applicative f =&gt; String -&gt; f String
</span><a href="#local-6989586621680942274"><span class="hs-identifier hs-var">getSetting</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;C compiler flags&quot;</span></span><span>
</span><span id="line-90"></span><span>  </span><span id="local-6989586621680942258"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680942258"><span class="hs-identifier hs-var">cxx_args_str</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">String -&gt; ExceptT SettingsError m String
forall {f :: * -&gt; *}. Applicative f =&gt; String -&gt; f String
</span><a href="#local-6989586621680942274"><span class="hs-identifier hs-var">getSetting</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;C++ compiler flags&quot;</span></span><span>
</span><span id="line-91"></span><span>  </span><span id="local-6989586621680942257"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680942257"><span class="hs-identifier hs-var">gccSupportsNoPie</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">String -&gt; ExceptT SettingsError m Bool
</span><a href="#local-6989586621680942265"><span class="hs-identifier hs-var">getBooleanSetting</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;C compiler supports -no-pie&quot;</span></span><span>
</span><span id="line-92"></span><span>  </span><span id="local-6989586621680942256"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680942256"><span class="hs-identifier hs-var">cpp_prog</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">String -&gt; ExceptT SettingsError m String
</span><a href="#local-6989586621680942269"><span class="hs-identifier hs-var">getToolSetting</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Haskell CPP command&quot;</span></span><span>
</span><span id="line-93"></span><span>  </span><span id="local-6989586621680942255"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680942255"><span class="hs-identifier hs-var">cpp_args_str</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">String -&gt; ExceptT SettingsError m String
forall {f :: * -&gt; *}. Applicative f =&gt; String -&gt; f String
</span><a href="#local-6989586621680942274"><span class="hs-identifier hs-var">getSetting</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Haskell CPP flags&quot;</span></span><span>
</span><span id="line-94"></span><span>
</span><span id="line-95"></span><span>  </span><span id="local-6989586621680942254"><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621680942254"><span class="hs-identifier hs-var">platform</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">(String -&gt; ExceptT SettingsError m Platform)
-&gt; (Platform -&gt; ExceptT SettingsError m Platform)
-&gt; Either String Platform
-&gt; ExceptT SettingsError m Platform
forall a c b. (a -&gt; c) -&gt; (b -&gt; c) -&gt; Either a b -&gt; c
</span><a href="../../base/src/Data.Either.html#either"><span class="hs-identifier hs-var">either</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; ExceptT SettingsError m Platform
forall a. String -&gt; a
</span><a href="GHC.Utils.Panic.Plain.html#pgmError"><span class="hs-identifier hs-var">pgmError</span></a></span><span> </span><span class="annot"><span class="annottext">Platform -&gt; ExceptT SettingsError m Platform
forall (f :: * -&gt; *) a. Applicative f =&gt; a -&gt; f a
</span><a href="../../base/src/GHC.Base.html#pure"><span class="hs-identifier hs-var">pure</span></a></span><span> </span><span class="annot"><span class="annottext">(Either String Platform -&gt; ExceptT SettingsError m Platform)
-&gt; Either String Platform -&gt; ExceptT SettingsError m Platform
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; Map String String -&gt; Either String Platform
</span><a href="../../ghc-boot/src/GHC.Settings.Platform.html#getTargetPlatform"><span class="hs-identifier hs-var">getTargetPlatform</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680942297"><span class="hs-identifier hs-var">settingsFile</span></a></span><span> </span><span class="annot"><span class="annottext">Map String String
</span><a href="#local-6989586621680942280"><span class="hs-identifier hs-var">mySettings</span></a></span><span>
</span><span id="line-96"></span><span>
</span><span id="line-97"></span><span>  </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621680942252"><span class="annot"><span class="annottext">unreg_cc_args :: [String]
</span><a href="#local-6989586621680942252"><span class="hs-identifier hs-var hs-var">unreg_cc_args</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Platform -&gt; Bool
</span><a href="../../ghc-boot/src/GHC.Platform.html#platformUnregisterised"><span class="hs-identifier hs-var hs-var">platformUnregisterised</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621680942254"><span class="hs-identifier hs-var">platform</span></a></span><span>
</span><span id="line-98"></span><span>                      </span><span class="hs-keyword">then</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;-DNO_REGS&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;-DUSE_MINIINTERPRETER&quot;</span></span><span class="hs-special">]</span><span>
</span><span id="line-99"></span><span>                      </span><span class="hs-keyword">else</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-100"></span><span>      </span><span id="local-6989586621680942250"><span class="annot"><span class="annottext">cpp_args :: [Option]
</span><a href="#local-6989586621680942250"><span class="hs-identifier hs-var hs-var">cpp_args</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(String -&gt; Option) -&gt; [String] -&gt; [Option]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; Option
</span><a href="GHC.Utils.CliOption.html#Option"><span class="hs-identifier hs-var">Option</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; [String]
</span><a href="../../base/src/Data.OldList.html#words"><span class="hs-identifier hs-var">words</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680942255"><span class="hs-identifier hs-var">cpp_args_str</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-101"></span><span>      </span><span id="local-6989586621680942247"><span class="annot"><span class="annottext">cc_args :: [String]
</span><a href="#local-6989586621680942247"><span class="hs-identifier hs-var hs-var">cc_args</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; [String]
</span><a href="../../base/src/Data.OldList.html#words"><span class="hs-identifier hs-var">words</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680942259"><span class="hs-identifier hs-var">cc_args_str</span></a></span><span> </span><span class="annot"><span class="annottext">[String] -&gt; [String] -&gt; [String]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621680942252"><span class="hs-identifier hs-var">unreg_cc_args</span></a></span><span>
</span><span id="line-102"></span><span>      </span><span id="local-6989586621680942246"><span class="annot"><span class="annottext">cxx_args :: [String]
</span><a href="#local-6989586621680942246"><span class="hs-identifier hs-var hs-var">cxx_args</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; [String]
</span><a href="../../base/src/Data.OldList.html#words"><span class="hs-identifier hs-var">words</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680942258"><span class="hs-identifier hs-var">cxx_args_str</span></a></span><span>
</span><span id="line-103"></span><span>  </span><span id="local-6989586621680942245"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680942245"><span class="hs-identifier hs-var">ldSupportsCompactUnwind</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">String -&gt; ExceptT SettingsError m Bool
</span><a href="#local-6989586621680942265"><span class="hs-identifier hs-var">getBooleanSetting</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;ld supports compact unwind&quot;</span></span><span>
</span><span id="line-104"></span><span>  </span><span id="local-6989586621680942244"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680942244"><span class="hs-identifier hs-var">ldSupportsBuildId</span></a></span></span><span>       </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">String -&gt; ExceptT SettingsError m Bool
</span><a href="#local-6989586621680942265"><span class="hs-identifier hs-var">getBooleanSetting</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;ld supports build-id&quot;</span></span><span>
</span><span id="line-105"></span><span>  </span><span id="local-6989586621680942243"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680942243"><span class="hs-identifier hs-var">ldSupportsFilelist</span></a></span></span><span>      </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">String -&gt; ExceptT SettingsError m Bool
</span><a href="#local-6989586621680942265"><span class="hs-identifier hs-var">getBooleanSetting</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;ld supports filelist&quot;</span></span><span>
</span><span id="line-106"></span><span>  </span><span id="local-6989586621680942242"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680942242"><span class="hs-identifier hs-var">ldIsGnuLd</span></a></span></span><span>               </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">String -&gt; ExceptT SettingsError m Bool
</span><a href="#local-6989586621680942265"><span class="hs-identifier hs-var">getBooleanSetting</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;ld is GNU ld&quot;</span></span><span>
</span><span id="line-107"></span><span>
</span><span id="line-108"></span><span>  </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621680942241"><span class="annot"><span class="annottext">globalpkgdb_path :: String
</span><a href="#local-6989586621680942241"><span class="hs-identifier hs-var hs-var">globalpkgdb_path</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; String
</span><a href="#local-6989586621680942303"><span class="hs-identifier hs-var">installed</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;package.conf.d&quot;</span></span><span>
</span><span id="line-109"></span><span>      </span><span id="local-6989586621680942240"><span class="annot"><span class="annottext">ghc_usage_msg_path :: String
</span><a href="#local-6989586621680942240"><span class="hs-identifier hs-var hs-var">ghc_usage_msg_path</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; String
</span><a href="#local-6989586621680942303"><span class="hs-identifier hs-var">installed</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;ghc-usage.txt&quot;</span></span><span>
</span><span id="line-110"></span><span>      </span><span id="local-6989586621680942239"><span class="annot"><span class="annottext">ghci_usage_msg_path :: String
</span><a href="#local-6989586621680942239"><span class="hs-identifier hs-var hs-var">ghci_usage_msg_path</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; String
</span><a href="#local-6989586621680942303"><span class="hs-identifier hs-var">installed</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;ghci-usage.txt&quot;</span></span><span>
</span><span id="line-111"></span><span>
</span><span id="line-112"></span><span>  </span><span class="hs-comment">-- For all systems, unlit, split, mangle are GHC utilities</span><span>
</span><span id="line-113"></span><span>  </span><span class="hs-comment">-- architecture-specific stuff is done when building Config.hs</span><span>
</span><span id="line-114"></span><span>  </span><span id="local-6989586621680942238"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680942238"><span class="hs-identifier hs-var">unlit_path</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">String -&gt; ExceptT SettingsError m String
</span><a href="#local-6989586621680942269"><span class="hs-identifier hs-var">getToolSetting</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;unlit command&quot;</span></span><span>
</span><span id="line-115"></span><span>
</span><span id="line-116"></span><span>  </span><span id="local-6989586621680942237"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680942237"><span class="hs-identifier hs-var">windres_path</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">String -&gt; ExceptT SettingsError m String
</span><a href="#local-6989586621680942269"><span class="hs-identifier hs-var">getToolSetting</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;windres command&quot;</span></span><span>
</span><span id="line-117"></span><span>  </span><span id="local-6989586621680942236"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680942236"><span class="hs-identifier hs-var">libtool_path</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">String -&gt; ExceptT SettingsError m String
</span><a href="#local-6989586621680942269"><span class="hs-identifier hs-var">getToolSetting</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;libtool command&quot;</span></span><span>
</span><span id="line-118"></span><span>  </span><span id="local-6989586621680942235"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680942235"><span class="hs-identifier hs-var">ar_path</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">String -&gt; ExceptT SettingsError m String
</span><a href="#local-6989586621680942269"><span class="hs-identifier hs-var">getToolSetting</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;ar command&quot;</span></span><span>
</span><span id="line-119"></span><span>  </span><span id="local-6989586621680942234"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680942234"><span class="hs-identifier hs-var">otool_path</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">String -&gt; ExceptT SettingsError m String
</span><a href="#local-6989586621680942269"><span class="hs-identifier hs-var">getToolSetting</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;otool command&quot;</span></span><span>
</span><span id="line-120"></span><span>  </span><span id="local-6989586621680942233"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680942233"><span class="hs-identifier hs-var">install_name_tool_path</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">String -&gt; ExceptT SettingsError m String
</span><a href="#local-6989586621680942269"><span class="hs-identifier hs-var">getToolSetting</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;install_name_tool command&quot;</span></span><span>
</span><span id="line-121"></span><span>  </span><span id="local-6989586621680942232"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680942232"><span class="hs-identifier hs-var">ranlib_path</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">String -&gt; ExceptT SettingsError m String
</span><a href="#local-6989586621680942269"><span class="hs-identifier hs-var">getToolSetting</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;ranlib command&quot;</span></span><span>
</span><span id="line-122"></span><span>
</span><span id="line-123"></span><span>  </span><span class="hs-comment">-- TODO this side-effect doesn't belong here. Reading and parsing the settings</span><span>
</span><span id="line-124"></span><span>  </span><span class="hs-comment">-- should be idempotent and accumulate no resources.</span><span>
</span><span id="line-125"></span><span>  </span><span id="local-6989586621680942231"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680942231"><span class="hs-identifier hs-var">tmpdir</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">IO String -&gt; ExceptT SettingsError m String
forall (m :: * -&gt; *) a. MonadIO m =&gt; IO a -&gt; m a
</span><a href="../../base/src/Control.Monad.IO.Class.html#liftIO"><span class="hs-identifier hs-var">liftIO</span></a></span><span> </span><span class="annot"><span class="annottext">(IO String -&gt; ExceptT SettingsError m String)
-&gt; IO String -&gt; ExceptT SettingsError m String
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">IO String
</span><a href="../../directory/src/System.Directory.html#getTemporaryDirectory"><span class="hs-identifier hs-var">getTemporaryDirectory</span></a></span><span>
</span><span id="line-126"></span><span>
</span><span id="line-127"></span><span>  </span><span id="local-6989586621680942229"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680942229"><span class="hs-identifier hs-var">touch_path</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">String -&gt; ExceptT SettingsError m String
</span><a href="#local-6989586621680942269"><span class="hs-identifier hs-var">getToolSetting</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;touch command&quot;</span></span><span>
</span><span id="line-128"></span><span>
</span><span id="line-129"></span><span>  </span><span id="local-6989586621680942228"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680942228"><span class="hs-identifier hs-var">mkdll_prog</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">String -&gt; ExceptT SettingsError m String
</span><a href="#local-6989586621680942269"><span class="hs-identifier hs-var">getToolSetting</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;dllwrap command&quot;</span></span><span>
</span><span id="line-130"></span><span>  </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621680942227"><span class="annot"><span class="annottext">mkdll_args :: [a]
</span><a href="#local-6989586621680942227"><span class="hs-identifier hs-var hs-var">mkdll_args</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-131"></span><span>
</span><span id="line-132"></span><span>  </span><span class="hs-comment">-- cpp is derived from gcc on all platforms</span><span>
</span><span id="line-133"></span><span>  </span><span class="hs-comment">-- HACK, see setPgmP below. We keep 'words' here to remember to fix</span><span>
</span><span id="line-134"></span><span>  </span><span class="hs-comment">-- Config.hs one day.</span><span>
</span><span id="line-135"></span><span>
</span><span id="line-136"></span><span>
</span><span id="line-137"></span><span>  </span><span class="hs-comment">-- Other things being equal, as and ld are simply gcc</span><span>
</span><span id="line-138"></span><span>  </span><span id="local-6989586621680942226"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680942226"><span class="hs-identifier hs-var">cc_link_args_str</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">String -&gt; ExceptT SettingsError m String
forall {f :: * -&gt; *}. Applicative f =&gt; String -&gt; f String
</span><a href="#local-6989586621680942274"><span class="hs-identifier hs-var">getSetting</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;C compiler link flags&quot;</span></span><span>
</span><span id="line-139"></span><span>  </span><span class="hs-keyword">let</span><span>   </span><span id="local-6989586621680942225"><span class="annot"><span class="annottext">as_prog :: String
</span><a href="#local-6989586621680942225"><span class="hs-identifier hs-var hs-var">as_prog</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680942260"><span class="hs-identifier hs-var">cc_prog</span></a></span><span>
</span><span id="line-140"></span><span>        </span><span id="local-6989586621680942224"><span class="annot"><span class="annottext">as_args :: [Option]
</span><a href="#local-6989586621680942224"><span class="hs-identifier hs-var hs-var">as_args</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(String -&gt; Option) -&gt; [String] -&gt; [Option]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; Option
</span><a href="GHC.Utils.CliOption.html#Option"><span class="hs-identifier hs-var">Option</span></a></span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621680942247"><span class="hs-identifier hs-var">cc_args</span></a></span><span>
</span><span id="line-141"></span><span>        </span><span id="local-6989586621680942223"><span class="annot"><span class="annottext">ld_prog :: String
</span><a href="#local-6989586621680942223"><span class="hs-identifier hs-var hs-var">ld_prog</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680942260"><span class="hs-identifier hs-var">cc_prog</span></a></span><span>
</span><span id="line-142"></span><span>        </span><span id="local-6989586621680942222"><span class="annot"><span class="annottext">ld_args :: [Option]
</span><a href="#local-6989586621680942222"><span class="hs-identifier hs-var hs-var">ld_args</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(String -&gt; Option) -&gt; [String] -&gt; [Option]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; Option
</span><a href="GHC.Utils.CliOption.html#Option"><span class="hs-identifier hs-var">Option</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621680942247"><span class="hs-identifier hs-var">cc_args</span></a></span><span> </span><span class="annot"><span class="annottext">[String] -&gt; [String] -&gt; [String]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; [String]
</span><a href="../../base/src/Data.OldList.html#words"><span class="hs-identifier hs-var">words</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680942226"><span class="hs-identifier hs-var">cc_link_args_str</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-143"></span><span>  </span><span id="local-6989586621680942221"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680942221"><span class="hs-identifier hs-var">ld_r_prog</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">String -&gt; ExceptT SettingsError m String
</span><a href="#local-6989586621680942269"><span class="hs-identifier hs-var">getToolSetting</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Merge objects command&quot;</span></span><span>
</span><span id="line-144"></span><span>  </span><span id="local-6989586621680942220"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680942220"><span class="hs-identifier hs-var">ld_r_args</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">String -&gt; ExceptT SettingsError m String
forall {f :: * -&gt; *}. Applicative f =&gt; String -&gt; f String
</span><a href="#local-6989586621680942274"><span class="hs-identifier hs-var">getSetting</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Merge objects flags&quot;</span></span><span>
</span><span id="line-145"></span><span>
</span><span id="line-146"></span><span>  </span><span id="local-6989586621680942219"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680942219"><span class="hs-identifier hs-var">llvmTarget</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">String -&gt; ExceptT SettingsError m String
forall {f :: * -&gt; *}. Applicative f =&gt; String -&gt; f String
</span><a href="#local-6989586621680942274"><span class="hs-identifier hs-var">getSetting</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;LLVM target&quot;</span></span><span>
</span><span id="line-147"></span><span>
</span><span id="line-148"></span><span>  </span><span class="hs-comment">-- We just assume on command line</span><span>
</span><span id="line-149"></span><span>  </span><span id="local-6989586621680942218"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680942218"><span class="hs-identifier hs-var">lc_prog</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">String -&gt; ExceptT SettingsError m String
forall {f :: * -&gt; *}. Applicative f =&gt; String -&gt; f String
</span><a href="#local-6989586621680942274"><span class="hs-identifier hs-var">getSetting</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;LLVM llc command&quot;</span></span><span>
</span><span id="line-150"></span><span>  </span><span id="local-6989586621680942217"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680942217"><span class="hs-identifier hs-var">lo_prog</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">String -&gt; ExceptT SettingsError m String
forall {f :: * -&gt; *}. Applicative f =&gt; String -&gt; f String
</span><a href="#local-6989586621680942274"><span class="hs-identifier hs-var">getSetting</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;LLVM opt command&quot;</span></span><span>
</span><span id="line-151"></span><span>  </span><span id="local-6989586621680942216"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680942216"><span class="hs-identifier hs-var">lcc_prog</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">String -&gt; ExceptT SettingsError m String
forall {f :: * -&gt; *}. Applicative f =&gt; String -&gt; f String
</span><a href="#local-6989586621680942274"><span class="hs-identifier hs-var">getSetting</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;LLVM clang command&quot;</span></span><span>
</span><span id="line-152"></span><span>
</span><span id="line-153"></span><span>  </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621680942215"><span class="annot"><span class="annottext">iserv_prog :: String
</span><a href="#local-6989586621680942215"><span class="hs-identifier hs-var hs-var">iserv_prog</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; String
</span><a href="#local-6989586621680942299"><span class="hs-identifier hs-var">libexec</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;ghc-iserv&quot;</span></span><span>
</span><span id="line-154"></span><span>
</span><span id="line-155"></span><span>  </span><span id="local-6989586621680942214"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680942214"><span class="hs-identifier hs-var">ghcWithInterpreter</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">String -&gt; ExceptT SettingsError m Bool
</span><a href="#local-6989586621680942265"><span class="hs-identifier hs-var">getBooleanSetting</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Use interpreter&quot;</span></span><span>
</span><span id="line-156"></span><span>  </span><span id="local-6989586621680942213"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680942213"><span class="hs-identifier hs-var">ghcWithSMP</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">String -&gt; ExceptT SettingsError m Bool
</span><a href="#local-6989586621680942265"><span class="hs-identifier hs-var">getBooleanSetting</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Support SMP&quot;</span></span><span>
</span><span id="line-157"></span><span>  </span><span id="local-6989586621680942212"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680942212"><span class="hs-identifier hs-var">ghcRTSWays</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">String -&gt; ExceptT SettingsError m String
forall {f :: * -&gt; *}. Applicative f =&gt; String -&gt; f String
</span><a href="#local-6989586621680942274"><span class="hs-identifier hs-var">getSetting</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;RTS ways&quot;</span></span><span>
</span><span id="line-158"></span><span>  </span><span id="local-6989586621680942211"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680942211"><span class="hs-identifier hs-var">useLibFFI</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">String -&gt; ExceptT SettingsError m Bool
</span><a href="#local-6989586621680942265"><span class="hs-identifier hs-var">getBooleanSetting</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Use LibFFI&quot;</span></span><span>
</span><span id="line-159"></span><span>  </span><span id="local-6989586621680942210"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680942210"><span class="hs-identifier hs-var">ghcThreaded</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">String -&gt; ExceptT SettingsError m Bool
</span><a href="#local-6989586621680942265"><span class="hs-identifier hs-var">getBooleanSetting</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Use Threads&quot;</span></span><span>
</span><span id="line-160"></span><span>  </span><span id="local-6989586621680942209"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680942209"><span class="hs-identifier hs-var">ghcDebugged</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">String -&gt; ExceptT SettingsError m Bool
</span><a href="#local-6989586621680942265"><span class="hs-identifier hs-var">getBooleanSetting</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Use Debugging&quot;</span></span><span>
</span><span id="line-161"></span><span>  </span><span id="local-6989586621680942208"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680942208"><span class="hs-identifier hs-var">ghcRtsWithLibdw</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">String -&gt; ExceptT SettingsError m Bool
</span><a href="#local-6989586621680942265"><span class="hs-identifier hs-var">getBooleanSetting</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;RTS expects libdw&quot;</span></span><span>
</span><span id="line-162"></span><span>
</span><span id="line-163"></span><span>  </span><span class="annot"><span class="annottext">Settings -&gt; ExceptT SettingsError m Settings
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">(Settings -&gt; ExceptT SettingsError m Settings)
-&gt; Settings -&gt; ExceptT SettingsError m Settings
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Settings :: GhcNameVersion
-&gt; FileSettings
-&gt; Platform
-&gt; ToolSettings
-&gt; PlatformMisc
-&gt; PlatformConstants
-&gt; [(String, String)]
-&gt; Settings
</span><a href="GHC.Settings.html#Settings"><span class="hs-identifier hs-type">Settings</span></a></span><span>
</span><span id="line-164"></span><span>    </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">sGhcNameVersion :: GhcNameVersion
</span><a href="GHC.Settings.html#sGhcNameVersion"><span class="hs-identifier hs-var">sGhcNameVersion</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">GhcNameVersion :: String -&gt; String -&gt; GhcNameVersion
</span><a href="GHC.Settings.html#GhcNameVersion"><span class="hs-identifier hs-type">GhcNameVersion</span></a></span><span>
</span><span id="line-165"></span><span>      </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">ghcNameVersion_programName :: String
</span><a href="GHC.Settings.html#ghcNameVersion_programName"><span class="hs-identifier hs-var">ghcNameVersion_programName</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;ghc&quot;</span></span><span>
</span><span id="line-166"></span><span>      </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">ghcNameVersion_projectVersion :: String
</span><a href="GHC.Settings.html#ghcNameVersion_projectVersion"><span class="hs-identifier hs-var">ghcNameVersion_projectVersion</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="../../ghc-boot/src/GHC.Version.html#cProjectVersion"><span class="hs-identifier hs-var">cProjectVersion</span></a></span><span>
</span><span id="line-167"></span><span>      </span><span class="hs-special">}</span><span>
</span><span id="line-168"></span><span>
</span><span id="line-169"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">sFileSettings :: FileSettings
</span><a href="GHC.Settings.html#sFileSettings"><span class="hs-identifier hs-var">sFileSettings</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FileSettings :: String
-&gt; String
-&gt; Maybe String
-&gt; String
-&gt; String
-&gt; String
-&gt; FileSettings
</span><a href="GHC.Settings.html#FileSettings"><span class="hs-identifier hs-type">FileSettings</span></a></span><span>
</span><span id="line-170"></span><span>      </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">fileSettings_tmpDir :: String
</span><a href="GHC.Settings.html#fileSettings_tmpDir"><span class="hs-identifier hs-var">fileSettings_tmpDir</span></a></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#normalise"><span class="hs-identifier hs-var">normalise</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680942231"><span class="hs-identifier hs-var">tmpdir</span></a></span><span>
</span><span id="line-171"></span><span>      </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">fileSettings_ghcUsagePath :: String
</span><a href="GHC.Settings.html#fileSettings_ghcUsagePath"><span class="hs-identifier hs-var">fileSettings_ghcUsagePath</span></a></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680942240"><span class="hs-identifier hs-var">ghc_usage_msg_path</span></a></span><span>
</span><span id="line-172"></span><span>      </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">fileSettings_ghciUsagePath :: String
</span><a href="GHC.Settings.html#fileSettings_ghciUsagePath"><span class="hs-identifier hs-var">fileSettings_ghciUsagePath</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680942239"><span class="hs-identifier hs-var">ghci_usage_msg_path</span></a></span><span>
</span><span id="line-173"></span><span>      </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">fileSettings_toolDir :: Maybe String
</span><a href="GHC.Settings.html#fileSettings_toolDir"><span class="hs-identifier hs-var">fileSettings_toolDir</span></a></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe String
</span><a href="#local-6989586621680942306"><span class="hs-identifier hs-var">mtool_dir</span></a></span><span>
</span><span id="line-174"></span><span>      </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">fileSettings_topDir :: String
</span><a href="GHC.Settings.html#fileSettings_topDir"><span class="hs-identifier hs-var">fileSettings_topDir</span></a></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680942307"><span class="hs-identifier hs-var">top_dir</span></a></span><span>
</span><span id="line-175"></span><span>      </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">fileSettings_globalPackageDatabase :: String
</span><a href="GHC.Settings.html#fileSettings_globalPackageDatabase"><span class="hs-identifier hs-var">fileSettings_globalPackageDatabase</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680942241"><span class="hs-identifier hs-var">globalpkgdb_path</span></a></span><span>
</span><span id="line-176"></span><span>      </span><span class="hs-special">}</span><span>
</span><span id="line-177"></span><span>
</span><span id="line-178"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">sToolSettings :: ToolSettings
</span><a href="GHC.Settings.html#sToolSettings"><span class="hs-identifier hs-var">sToolSettings</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ToolSettings :: Bool
-&gt; Bool
-&gt; Bool
-&gt; Bool
-&gt; Bool
-&gt; String
-&gt; (String, [Option])
-&gt; String
-&gt; String
-&gt; (String, [Option])
-&gt; (String, [Option])
-&gt; (String, [Option])
-&gt; (String, [Option])
-&gt; String
-&gt; String
-&gt; String
-&gt; String
-&gt; String
-&gt; String
-&gt; String
-&gt; (String, [Option])
-&gt; (String, [Option])
-&gt; (String, [Option])
-&gt; String
-&gt; [String]
-&gt; [String]
-&gt; Fingerprint
-&gt; [String]
-&gt; [String]
-&gt; [String]
-&gt; [String]
-&gt; [String]
-&gt; [String]
-&gt; [String]
-&gt; [String]
-&gt; [String]
-&gt; [String]
-&gt; [String]
-&gt; [String]
-&gt; ToolSettings
</span><a href="GHC.Settings.html#ToolSettings"><span class="hs-identifier hs-type">ToolSettings</span></a></span><span>
</span><span id="line-179"></span><span>      </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">toolSettings_ldSupportsCompactUnwind :: Bool
</span><a href="GHC.Settings.html#toolSettings_ldSupportsCompactUnwind"><span class="hs-identifier hs-var">toolSettings_ldSupportsCompactUnwind</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680942245"><span class="hs-identifier hs-var">ldSupportsCompactUnwind</span></a></span><span>
</span><span id="line-180"></span><span>      </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">toolSettings_ldSupportsBuildId :: Bool
</span><a href="GHC.Settings.html#toolSettings_ldSupportsBuildId"><span class="hs-identifier hs-var">toolSettings_ldSupportsBuildId</span></a></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680942244"><span class="hs-identifier hs-var">ldSupportsBuildId</span></a></span><span>
</span><span id="line-181"></span><span>      </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">toolSettings_ldSupportsFilelist :: Bool
</span><a href="GHC.Settings.html#toolSettings_ldSupportsFilelist"><span class="hs-identifier hs-var">toolSettings_ldSupportsFilelist</span></a></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680942243"><span class="hs-identifier hs-var">ldSupportsFilelist</span></a></span><span>
</span><span id="line-182"></span><span>      </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">toolSettings_ldIsGnuLd :: Bool
</span><a href="GHC.Settings.html#toolSettings_ldIsGnuLd"><span class="hs-identifier hs-var">toolSettings_ldIsGnuLd</span></a></span><span>               </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680942242"><span class="hs-identifier hs-var">ldIsGnuLd</span></a></span><span>
</span><span id="line-183"></span><span>      </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">toolSettings_ccSupportsNoPie :: Bool
</span><a href="GHC.Settings.html#toolSettings_ccSupportsNoPie"><span class="hs-identifier hs-var">toolSettings_ccSupportsNoPie</span></a></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680942257"><span class="hs-identifier hs-var">gccSupportsNoPie</span></a></span><span>
</span><span id="line-184"></span><span>
</span><span id="line-185"></span><span>      </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">toolSettings_pgm_L :: String
</span><a href="GHC.Settings.html#toolSettings_pgm_L"><span class="hs-identifier hs-var">toolSettings_pgm_L</span></a></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680942238"><span class="hs-identifier hs-var">unlit_path</span></a></span><span>
</span><span id="line-186"></span><span>      </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">toolSettings_pgm_P :: (String, [Option])
</span><a href="GHC.Settings.html#toolSettings_pgm_P"><span class="hs-identifier hs-var">toolSettings_pgm_P</span></a></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680942256"><span class="hs-identifier hs-var">cpp_prog</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[Option]
</span><a href="#local-6989586621680942250"><span class="hs-identifier hs-var">cpp_args</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-187"></span><span>      </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">toolSettings_pgm_F :: String
</span><a href="GHC.Settings.html#toolSettings_pgm_F"><span class="hs-identifier hs-var">toolSettings_pgm_F</span></a></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;&quot;</span></span><span>
</span><span id="line-188"></span><span>      </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">toolSettings_pgm_c :: String
</span><a href="GHC.Settings.html#toolSettings_pgm_c"><span class="hs-identifier hs-var">toolSettings_pgm_c</span></a></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680942260"><span class="hs-identifier hs-var">cc_prog</span></a></span><span>
</span><span id="line-189"></span><span>      </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">toolSettings_pgm_a :: (String, [Option])
</span><a href="GHC.Settings.html#toolSettings_pgm_a"><span class="hs-identifier hs-var">toolSettings_pgm_a</span></a></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680942225"><span class="hs-identifier hs-var">as_prog</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[Option]
</span><a href="#local-6989586621680942224"><span class="hs-identifier hs-var">as_args</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-190"></span><span>      </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">toolSettings_pgm_l :: (String, [Option])
</span><a href="GHC.Settings.html#toolSettings_pgm_l"><span class="hs-identifier hs-var">toolSettings_pgm_l</span></a></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680942223"><span class="hs-identifier hs-var">ld_prog</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[Option]
</span><a href="#local-6989586621680942222"><span class="hs-identifier hs-var">ld_args</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-191"></span><span>      </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">toolSettings_pgm_lm :: (String, [Option])
</span><a href="GHC.Settings.html#toolSettings_pgm_lm"><span class="hs-identifier hs-var">toolSettings_pgm_lm</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680942221"><span class="hs-identifier hs-var">ld_r_prog</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">(String -&gt; Option) -&gt; [String] -&gt; [Option]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; Option
</span><a href="GHC.Utils.CliOption.html#Option"><span class="hs-identifier hs-var">Option</span></a></span><span> </span><span class="annot"><span class="annottext">([String] -&gt; [Option]) -&gt; [String] -&gt; [Option]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; [String]
</span><a href="../../base/src/Data.OldList.html#words"><span class="hs-identifier hs-var">words</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680942220"><span class="hs-identifier hs-var">ld_r_args</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-192"></span><span>      </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">toolSettings_pgm_dll :: (String, [Option])
</span><a href="GHC.Settings.html#toolSettings_pgm_dll"><span class="hs-identifier hs-var">toolSettings_pgm_dll</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680942228"><span class="hs-identifier hs-var">mkdll_prog</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">[Option]
forall a. [a]
</span><a href="#local-6989586621680942227"><span class="hs-identifier hs-var">mkdll_args</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-193"></span><span>      </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">toolSettings_pgm_T :: String
</span><a href="GHC.Settings.html#toolSettings_pgm_T"><span class="hs-identifier hs-var">toolSettings_pgm_T</span></a></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680942229"><span class="hs-identifier hs-var">touch_path</span></a></span><span>
</span><span id="line-194"></span><span>      </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">toolSettings_pgm_windres :: String
</span><a href="GHC.Settings.html#toolSettings_pgm_windres"><span class="hs-identifier hs-var">toolSettings_pgm_windres</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680942237"><span class="hs-identifier hs-var">windres_path</span></a></span><span>
</span><span id="line-195"></span><span>      </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">toolSettings_pgm_libtool :: String
</span><a href="GHC.Settings.html#toolSettings_pgm_libtool"><span class="hs-identifier hs-var">toolSettings_pgm_libtool</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680942236"><span class="hs-identifier hs-var">libtool_path</span></a></span><span>
</span><span id="line-196"></span><span>      </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">toolSettings_pgm_ar :: String
</span><a href="GHC.Settings.html#toolSettings_pgm_ar"><span class="hs-identifier hs-var">toolSettings_pgm_ar</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680942235"><span class="hs-identifier hs-var">ar_path</span></a></span><span>
</span><span id="line-197"></span><span>      </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">toolSettings_pgm_otool :: String
</span><a href="GHC.Settings.html#toolSettings_pgm_otool"><span class="hs-identifier hs-var">toolSettings_pgm_otool</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680942234"><span class="hs-identifier hs-var">otool_path</span></a></span><span>
</span><span id="line-198"></span><span>      </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">toolSettings_pgm_install_name_tool :: String
</span><a href="GHC.Settings.html#toolSettings_pgm_install_name_tool"><span class="hs-identifier hs-var">toolSettings_pgm_install_name_tool</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680942233"><span class="hs-identifier hs-var">install_name_tool_path</span></a></span><span>
</span><span id="line-199"></span><span>      </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">toolSettings_pgm_ranlib :: String
</span><a href="GHC.Settings.html#toolSettings_pgm_ranlib"><span class="hs-identifier hs-var">toolSettings_pgm_ranlib</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680942232"><span class="hs-identifier hs-var">ranlib_path</span></a></span><span>
</span><span id="line-200"></span><span>      </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">toolSettings_pgm_lo :: (String, [Option])
</span><a href="GHC.Settings.html#toolSettings_pgm_lo"><span class="hs-identifier hs-var">toolSettings_pgm_lo</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680942217"><span class="hs-identifier hs-var">lo_prog</span></a></span><span class="hs-special">,</span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-201"></span><span>      </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">toolSettings_pgm_lc :: (String, [Option])
</span><a href="GHC.Settings.html#toolSettings_pgm_lc"><span class="hs-identifier hs-var">toolSettings_pgm_lc</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680942218"><span class="hs-identifier hs-var">lc_prog</span></a></span><span class="hs-special">,</span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-202"></span><span>      </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">toolSettings_pgm_lcc :: (String, [Option])
</span><a href="GHC.Settings.html#toolSettings_pgm_lcc"><span class="hs-identifier hs-var">toolSettings_pgm_lcc</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680942216"><span class="hs-identifier hs-var">lcc_prog</span></a></span><span class="hs-special">,</span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-203"></span><span>      </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">toolSettings_pgm_i :: String
</span><a href="GHC.Settings.html#toolSettings_pgm_i"><span class="hs-identifier hs-var">toolSettings_pgm_i</span></a></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680942215"><span class="hs-identifier hs-var">iserv_prog</span></a></span><span>
</span><span id="line-204"></span><span>      </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">toolSettings_opt_L :: [String]
</span><a href="GHC.Settings.html#toolSettings_opt_L"><span class="hs-identifier hs-var">toolSettings_opt_L</span></a></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-205"></span><span>      </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">toolSettings_opt_P :: [String]
</span><a href="GHC.Settings.html#toolSettings_opt_P"><span class="hs-identifier hs-var">toolSettings_opt_P</span></a></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-206"></span><span>      </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">toolSettings_opt_P_fingerprint :: Fingerprint
</span><a href="GHC.Settings.html#toolSettings_opt_P_fingerprint"><span class="hs-identifier hs-var">toolSettings_opt_P_fingerprint</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Fingerprint
</span><a href="../../base/src/GHC.Fingerprint.html#fingerprint0"><span class="hs-identifier hs-var">fingerprint0</span></a></span><span>
</span><span id="line-207"></span><span>      </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">toolSettings_opt_F :: [String]
</span><a href="GHC.Settings.html#toolSettings_opt_F"><span class="hs-identifier hs-var">toolSettings_opt_F</span></a></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-208"></span><span>      </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">toolSettings_opt_c :: [String]
</span><a href="GHC.Settings.html#toolSettings_opt_c"><span class="hs-identifier hs-var">toolSettings_opt_c</span></a></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621680942247"><span class="hs-identifier hs-var">cc_args</span></a></span><span>
</span><span id="line-209"></span><span>      </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">toolSettings_opt_cxx :: [String]
</span><a href="GHC.Settings.html#toolSettings_opt_cxx"><span class="hs-identifier hs-var">toolSettings_opt_cxx</span></a></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621680942246"><span class="hs-identifier hs-var">cxx_args</span></a></span><span>
</span><span id="line-210"></span><span>      </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">toolSettings_opt_a :: [String]
</span><a href="GHC.Settings.html#toolSettings_opt_a"><span class="hs-identifier hs-var">toolSettings_opt_a</span></a></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-211"></span><span>      </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">toolSettings_opt_l :: [String]
</span><a href="GHC.Settings.html#toolSettings_opt_l"><span class="hs-identifier hs-var">toolSettings_opt_l</span></a></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-212"></span><span>      </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">toolSettings_opt_lm :: [String]
</span><a href="GHC.Settings.html#toolSettings_opt_lm"><span class="hs-identifier hs-var">toolSettings_opt_lm</span></a></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-213"></span><span>      </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">toolSettings_opt_windres :: [String]
</span><a href="GHC.Settings.html#toolSettings_opt_windres"><span class="hs-identifier hs-var">toolSettings_opt_windres</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-214"></span><span>      </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">toolSettings_opt_lcc :: [String]
</span><a href="GHC.Settings.html#toolSettings_opt_lcc"><span class="hs-identifier hs-var">toolSettings_opt_lcc</span></a></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-215"></span><span>      </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">toolSettings_opt_lo :: [String]
</span><a href="GHC.Settings.html#toolSettings_opt_lo"><span class="hs-identifier hs-var">toolSettings_opt_lo</span></a></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-216"></span><span>      </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">toolSettings_opt_lc :: [String]
</span><a href="GHC.Settings.html#toolSettings_opt_lc"><span class="hs-identifier hs-var">toolSettings_opt_lc</span></a></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-217"></span><span>      </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">toolSettings_opt_i :: [String]
</span><a href="GHC.Settings.html#toolSettings_opt_i"><span class="hs-identifier hs-var">toolSettings_opt_i</span></a></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-218"></span><span>
</span><span id="line-219"></span><span>      </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">toolSettings_extraGccViaCFlags :: [String]
</span><a href="GHC.Settings.html#toolSettings_extraGccViaCFlags"><span class="hs-identifier hs-var">toolSettings_extraGccViaCFlags</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; [String]
</span><a href="../../base/src/Data.OldList.html#words"><span class="hs-identifier hs-var">words</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680942261"><span class="hs-identifier hs-var">myExtraGccViaCFlags</span></a></span><span>
</span><span id="line-220"></span><span>      </span><span class="hs-special">}</span><span>
</span><span id="line-221"></span><span>
</span><span id="line-222"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">sTargetPlatform :: Platform
</span><a href="GHC.Settings.html#sTargetPlatform"><span class="hs-identifier hs-var">sTargetPlatform</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621680942254"><span class="hs-identifier hs-var">platform</span></a></span><span>
</span><span id="line-223"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">sPlatformMisc :: PlatformMisc
</span><a href="GHC.Settings.html#sPlatformMisc"><span class="hs-identifier hs-var">sPlatformMisc</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">PlatformMisc :: String
-&gt; Bool
-&gt; Bool
-&gt; String
-&gt; Bool
-&gt; Bool
-&gt; Bool
-&gt; Bool
-&gt; String
-&gt; PlatformMisc
</span><a href="../../ghc-boot/src/GHC.Platform.html#PlatformMisc"><span class="hs-identifier hs-type">PlatformMisc</span></a></span><span>
</span><span id="line-224"></span><span>      </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">platformMisc_targetPlatformString :: String
</span><a href="../../ghc-boot/src/GHC.Platform.html#platformMisc_targetPlatformString"><span class="hs-identifier hs-var">platformMisc_targetPlatformString</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680942262"><span class="hs-identifier hs-var">targetPlatformString</span></a></span><span>
</span><span id="line-225"></span><span>      </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">platformMisc_ghcWithInterpreter :: Bool
</span><a href="../../ghc-boot/src/GHC.Platform.html#platformMisc_ghcWithInterpreter"><span class="hs-identifier hs-var">platformMisc_ghcWithInterpreter</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680942214"><span class="hs-identifier hs-var">ghcWithInterpreter</span></a></span><span>
</span><span id="line-226"></span><span>      </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">platformMisc_ghcWithSMP :: Bool
</span><a href="../../ghc-boot/src/GHC.Platform.html#platformMisc_ghcWithSMP"><span class="hs-identifier hs-var">platformMisc_ghcWithSMP</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680942213"><span class="hs-identifier hs-var">ghcWithSMP</span></a></span><span>
</span><span id="line-227"></span><span>      </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">platformMisc_ghcRTSWays :: String
</span><a href="../../ghc-boot/src/GHC.Platform.html#platformMisc_ghcRTSWays"><span class="hs-identifier hs-var">platformMisc_ghcRTSWays</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680942212"><span class="hs-identifier hs-var">ghcRTSWays</span></a></span><span>
</span><span id="line-228"></span><span>      </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">platformMisc_libFFI :: Bool
</span><a href="../../ghc-boot/src/GHC.Platform.html#platformMisc_libFFI"><span class="hs-identifier hs-var">platformMisc_libFFI</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680942211"><span class="hs-identifier hs-var">useLibFFI</span></a></span><span>
</span><span id="line-229"></span><span>      </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">platformMisc_ghcThreaded :: Bool
</span><a href="../../ghc-boot/src/GHC.Platform.html#platformMisc_ghcThreaded"><span class="hs-identifier hs-var">platformMisc_ghcThreaded</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680942210"><span class="hs-identifier hs-var">ghcThreaded</span></a></span><span>
</span><span id="line-230"></span><span>      </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">platformMisc_ghcDebugged :: Bool
</span><a href="../../ghc-boot/src/GHC.Platform.html#platformMisc_ghcDebugged"><span class="hs-identifier hs-var">platformMisc_ghcDebugged</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680942209"><span class="hs-identifier hs-var">ghcDebugged</span></a></span><span>
</span><span id="line-231"></span><span>      </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">platformMisc_ghcRtsWithLibdw :: Bool
</span><a href="../../ghc-boot/src/GHC.Platform.html#platformMisc_ghcRtsWithLibdw"><span class="hs-identifier hs-var">platformMisc_ghcRtsWithLibdw</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680942208"><span class="hs-identifier hs-var">ghcRtsWithLibdw</span></a></span><span>
</span><span id="line-232"></span><span>      </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">platformMisc_llvmTarget :: String
</span><a href="../../ghc-boot/src/GHC.Platform.html#platformMisc_llvmTarget"><span class="hs-identifier hs-var">platformMisc_llvmTarget</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680942219"><span class="hs-identifier hs-var">llvmTarget</span></a></span><span>
</span><span id="line-233"></span><span>      </span><span class="hs-special">}</span><span>
</span><span id="line-234"></span><span>
</span><span id="line-235"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">sPlatformConstants :: PlatformConstants
</span><a href="GHC.Settings.html#sPlatformConstants"><span class="hs-identifier hs-var">sPlatformConstants</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">PlatformConstants
</span><a href="#local-6989586621680942278"><span class="hs-identifier hs-var">platformConstants</span></a></span><span>
</span><span id="line-236"></span><span>
</span><span id="line-237"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">sRawSettings :: [(String, String)]
</span><a href="GHC.Settings.html#sRawSettings"><span class="hs-identifier hs-var">sRawSettings</span></a></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[(String, String)]
</span><a href="#local-6989586621680942288"><span class="hs-identifier hs-var">settingsList</span></a></span><span>
</span><span id="line-238"></span><span>    </span><span class="hs-special">}</span><span>
</span><span id="line-239"></span></pre></body></html>